package com.rd.student.jiaji.class4.suyan.zrrd.homework2;

import java.util.Arrays;
import java.util.Random;

public class 作业讲解2 {
    public static void main(String[] args) {
        boolean[] color=new boolean[35];
        int[] red =new int[5];
        Random random =new Random();
        int index=0;
        for (;;){
            int a=random.nextInt(35);
            if (!color[a]){
                red[index]=a+1;
                index++;
            }
            if (index==5){
                break;
            }
        }
        System.out.println(Arrays.toString(red));

    }
}
